package org.example.springboot_s3_mybatis.Mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.example.springboot_s3_mybatis.entity.Dapt;
import org.example.springboot_s3_mybatis.entity.Emp;

import java.util.List;


public interface Empmapper {
    @Delete("delete from emp where id = #{id}")
     int delete(Integer id);
    @Insert("insert into emp values (#{id},#{username},#{password},#{name},#{gender},#{image},#{job},#{entryDate},#{deptId},#{createTime},#{updateTime})")
     int insert(Emp empmapper);
    @Select("select * from emp where username like concat('%' #{username} '%')")//模糊查询
    List<Emp> selectAll(String username);
}
